<template>
	<view>
		<u-navbar :is-back="false" title="我的" :background="background"></u-navbar>
		<view class="content" :style="{'min-height': ' calc(100vh - '+navbarHeight + 'px)'}">
			<view class="info f-c-sb" @tap="openUserInfo">
				<view>
					<view>
						<span>门店名称：</span>
						{{ userInfo.storeName }}
					</view>
					<view>
						<span>用户昵称：</span>
						{{ userInfo.nickName }}
					</view>
					<view>
						<span>所属角色：</span>
						{{ userInfo.roleName }}
					</view>
				</view>
				<view >
					<u-icon name="arrow-right" color="#333333" size="26"></u-icon>
				</view>
			</view>
			
			<view class="list boxShadow">
				<view class="item f-c-sb" @tap="openStoreInfo">
					<view class="label">
						<image :src="imagePath+'glxcx/-e-门店信息.png'" mode=""></image>
						门店信息
					</view>
					<u-icon name="arrow-right" color="#333333" size="26"></u-icon>
				</view>
		

				<view class="item f-c-sb" @click="myCustomer">
					<view class="label">
						<image mode="" :src="imagePath+'glxcx/-e-在线客服.png'"></image>
						我的客户
					</view>
					<u-icon color="#333333" name="arrow-right" size="26"></u-icon>
				</view>
			</view>
			<view class="btn" @click="quit">退出登录</view>
		</view>
		<view class="tip">
			技术支持:深圳市行知网络科技有限公司
		</view>
	</view>
</template>

<script>
	import {
		incomeCount,
		storeQrCode
	} from '@/api/my';
	import {
		mapGetters
	} from 'vuex';

	let systemInfo = uni.getSystemInfoSync();
	export default {
		data() {
			return {
				imagePath:this.$imagePath,
				background: {
					background: 'url('+this.$imagePath+'glxcx/-e-00背景.png) no-repeat',
					backgroundSize: 'cover'
				},
				show: false,
				path: '',
				param: {
					storeBasicId: ''
				},
				data: 0,
				navbarHeight: systemInfo.statusBarHeight+48
			};
		},
		computed: {
			userInfo() {
				return this.$store.state.userInfo;
			}
		},
		onLoad() {},
		methods: {
			onShareAppMessage: function(res) {
				return {
					path: 'pages/login/login'
				}
			},
			//个人信息
			openUserInfo() {
				this.$navigateTo('/pages/my/user', {});
			},
			//门店信息
			openStoreInfo() {
				this.$navigateTo('/pages/my/store', {});
			},
			//我的客户
			myCustomer() {
			  	this.$navigateTo('/workbench/clientManage/list', {})
			},
			//退出登录
			quit() {
				this.$clear()
				this.$navigateTo('/pages/login/login', {});
			}
		}
	};
</script>

<style lang="less">
	.content {
		width: 100%;
		background: linear-gradient(0deg, #ffffff 90%, #e5f0ff 100%);
		.info {
			padding: 31rpx 42rpx;
			box-sizing: border-box;
			font-size: 26rpx;
			font-weight: 700;
			color: #333;
			line-height: 64rpx;

			span {
				color: #999;
			}
		}
		
		.list {
			width: 659rpx;
			margin: 20rpx auto;
			padding: 0 29rpx 0 18rpx;
			box-sizing: border-box;
			background: #fff;

			.item {
				width: 100%;
				height: 107rpx;
				border-bottom: 1px solid #ebebeb;
				font-size: 26rpx;
				font-weight: 700;
				color: #333333;
                position: relative;
				image {
					width: 36rpx;
					height: 36rpx;
					margin-right: 13rpx;
					vertical-align: middle;
					display: inline-block;
				}
			}
		}

		.btn {
			width: 710rpx;
			height: 100rpx;
			background: #ffffff;
			border: 2rpx solid #177fff;
			border-radius: 13rpx;
			font-size: 32rpx;
			font-weight: bold;
			text-align: center;
			color: #177fff;
			margin: 40rpx auto 0;
			line-height: 100rpx;
		}
	}
	.tip {
		position: absolute;
		bottom: 30rpx;
		width: 100%;
		text-align: center;
		color: #999;
		
	}
</style>
